<template>
	<hx-navbar
		:title="title"
		:back="false"
		:leftSlot="true"
		:fixed="true"
		>
		<view slot="left">
			<uni-icons v-if="back" @click="onClickLeft" type="arrowleft" color="black" size="20" style="margin-left: 10upx;"/>
			<text @click="toHome" class="mark-icon-class" style="margin-left: 20rpx;font-size: 36.64rpx;">&#xe63f;</text>
		</view>
	</hx-navbar>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		props: {
			back: {
				type: Boolean,
				default: () => true
			},
			title: {
				type: String,
				default: () => ''
			}
		},
		methods: {
			toHome(){
				uni.redirectTo({
					url: '../index/index'
				})
			},
			onClickLeft () {
				if(getCurrentPages().length>1){
					uni.navigateBack();
				}else{
					history.back()
				}
			},
		},
	}
</script>

<style>

@import url("~@/static/common.scss");

</style>
